//
//  FeedbackContentView.m
//  CoachsBook
//
//  Created by huiyong li on 2022/9/1.
//

#import "FeedbackContentView.h"


@implementation FeedbackContentView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self CreateUI];
    }
    return self;
}
-(void)CreateUI{
    UIView *backV = [[UIView alloc]initWithFrame:CGRectMake(0, 0, APPwidth, 255)];
    backV.backgroundColor = [UIColor whiteColor];
    [self addSubview:backV];
    
    UIView *myDataLineV = [[UIView alloc]initWithFrame:CGRectMake(15, 15, 3, 15)];
    myDataLineV.backgroundColor = rgba(22, 120, 255, 1);
    myDataLineV.layer.cornerRadius = 2;
    [backV addSubview:myDataLineV];
    UILabel *myDataLab = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(myDataLineV.frame)+5, 15, 70, 15)];
    myDataLab.text = @"反馈内容";
    myDataLab.textColor = [UIColor blackColor];
    myDataLab.textAlignment = 0;
    myDataLab.font = kPingFangSemibold(16);
    [backV addSubview:myDataLab];
    
    
    WS(weakSelf)
    self.FeedbackContentTextView = [[Long_TextView alloc]initWithFrame:CGRectMake(16, 45, APPwidth-32, 200) letfEdge:5 topEdgw:10 hintText:@"请输入反馈内容" maxLength:200];
    [self.FeedbackContentTextView setBackgroundColor:rgba(245, 245, 250, 1)];
    [self.FeedbackContentTextView.textView setFont:[UIFont systemFontOfSize:14]];
    [self.FeedbackContentTextView.hintLable setFont:[UIFont systemFontOfSize:14]];
    self.FeedbackContentTextView.hintLable.textColor =rgba(180, 180, 180, 1);
    [self.FeedbackContentTextView.textLenthLable setFont:[UIFont systemFontOfSize:14]];
    self.FeedbackContentTextView.textLenthLable.textColor = rgba(153, 153, 153, 1);
    self.FeedbackContentTextView.radius = 8;
    self.FeedbackContentTextView.Long_TextViewBlock = ^(NSString * _Nonnull textViewText) {
        if ([weakSelf.delegate respondsToSelector:@selector(FeedbackContentViewDelegateWithContent:)]) {
            [weakSelf.delegate FeedbackContentViewDelegateWithContent:textViewText];
        }
    };
    
    [backV addSubview:self.FeedbackContentTextView];
    
}
@end
